package lol.oxguy3.androidsample;

import android.app.Activity;
import android.os.Bundle;
import android.widget.*;

public class SampleActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        TextView derpview = new TextView(this);
        derpview.setTag("derptextview1");
        derpview.setText("Your progress is X/X");
        
        SeekBar seekBar1 = new SeekBar(this);
        seekBar1.setMax(100);
        seekBar1.setProgress(25);
        seekBar1.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
			
			public void onStopTrackingTouch(SeekBar seekBar) {
				// TODO Auto-generated method stub
				
			}
			
			public void onStartTrackingTouch(SeekBar seekBar) {
				// TODO Auto-generated method stub
				
			}
			
			public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
				//seekBar.getRootView().findViewWithTag("derptextview1")).
				//derpview.setText("Seek bar is at "+s)
				
			}
		});
        
        DatePicker datePicker1 = new DatePicker(this);
        datePicker1.init(1996, 0, 16, new DatePicker.OnDateChangedListener() {
			
			public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
				System.out.println("Date changed to "+String.valueOf(year)+"-"+String.valueOf(monthOfYear+1)+"-"+String.valueOf(dayOfMonth)+".");
				
			}
		});
        
        Spinner spinner1 = new Spinner(this);
        ArrayAdapter<CharSequence> spinner1ad = ArrayAdapter.createFromResource(this, R.array.spinner1arr, android.R.layout.simple_spinner_item);
        spinner1ad.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinner1.setAdapter(spinner1ad);
        
        Button button1 = new Button(this);
        button1.setText("Resolve Core Replacement Stalemate");
        
        
        
        LinearLayout derplayout = (LinearLayout) findViewById(R.id.derp);
        derplayout.addView(derpview);
        derplayout.addView(seekBar1);
        derplayout.addView(datePicker1);
        derplayout.addView(spinner1);
        derplayout.addView(button1);
    }
}